package com.bwie;

import lombok.Getter;

/**
 * 自定义业务异常类
 */
@Getter
public class CreateMyException extends RuntimeException{
    private final int code;

    public CreateMyException(ErrorCode errorCode){
        super(errorCode.getDesc());
        this.code = errorCode.getCode();
    }

    public CreateMyException(int code,String message){
        super(message);
        this.code = code;
    }

}
